import { core, registerScript } from "./gameengine";
import { LandingBehaviour } from "./landing/LandingBehaviour";
import { GamingBehaviour } from "./gaming/GamingBehaviour";
import { RectCollider } from "./rect/RectCollider";
import { ColliderSystem } from "./rect/ColliderSystem";
import { MoveBehaviour } from "./game/MoveBehaviour";
import { MainRoleBehaviour } from "./rect/MainRoleBehaviour";
import { disappear } from "./disappear";
import { TileMapRenderer } from "./tilemap";
import { GamePlayBehaviour } from "./game/GamePlayBehaviour";
import { UpdateScoreBehaviour } from "./game/UpdateScoreBehaviour";
import { MonsterBehaviour, FightUI } from "./monster";
import { marshal, MarshalOpeningState, MarshalStartState, MarshalFirstState, MarshalSecondState, MarshalThirdState, MarshalFourthState, MarshalFifthState, MarshalSixthState, MarshalSeventhState, MarshalTestState, MarshalFinishState } from "./Marshal";
import { hpBehaviour } from "./HP";
import { goldBehaviour } from "./GOLD";
import { Shop } from "./Shop";
import { enterShop } from "./enterShop";
import { hphupBehaviour } from "./hpup";
import { EFbear,EFbear2,EFbear3 } from "./enterfight/efbear"
import { Fight } from "./fight"
import { TP } from "./TPpoint";
import { StartUIBehaviour } from "./gaming/StartUIBehaviour";
import{Fightm}from "./fight/fightmouse";
import{Fightb,Fightb2,Fightb3}from "./fight/fightbear";
import{FightBOSS}from "./fight/fightBOSS";
import{Fightr}from "./fight/fightrabbit";
import{Fights}from "./fight/fightsnake";
import{Fightw,Fightw2}from "./fight/fightwildpig";
import{attBehaviour}from "./ATTCK";
import{defBehaviour}from "./DEFENCE";
import { EFsnake } from "./enterfight/efsnake"
import { EFBOSS } from "./enterfight/efboss"
import { EFmouse } from "./enterfight/efmouse"
import { EFrabbit } from "./enterfight/efrabbit"
import { EFwildpig,EFwildpig2 } from "./enterfight/efwildpig"
import{appleBehaviour}from "./apple"
import{peachBehaviour}from "./peach"
import{bananaBehaviour}from "./banana"
import { a } from "./data";
import{Applemeet}from "./applemeet";
import{Bananameet}from "./bananameet";
import{Peachmeet}from "./peachmeet";
import{Milkmeet}from "./milkmeet";
import{Capmeet}from "./capmeet";
import{Attmeet}from "./attmeet";
import{Lock0,Lock1,Lock2}from "./lock"
import { StartUIshuomingBehaviour } from "./gaming/StartUIshuomingBehaviour";
import { ShuomingUIBehaviour } from "./gaming/ShuomingUIBehaviour";
import { UIdisappear } from "./gaming/UIdisappear"
import { daocaoren1 } from "./gaming/daocaoren1";
import { cao } from "./gaming/cao";
import { shengchengUI } from "./gaming/shengchengUI";
import { daocaorenkaidemen } from "./gaming/daocaorenkaidemen";
import{yuxieshitou} from "./gaming/yuxieshitou";
import{yuxiexiaoshi} from "./gaming/yuxiexiaoshi";
import{nainiu} from "./gaming/nainiu";






registerScript(GamingBehaviour);
registerScript(LandingBehaviour);
registerScript(RectCollider);
registerScript(ColliderSystem);
registerScript(MoveBehaviour);
registerScript(MainRoleBehaviour);
registerScript(disappear);
registerScript(GamePlayBehaviour);
registerScript(UpdateScoreBehaviour);
registerScript(TileMapRenderer);
registerScript(MonsterBehaviour);
registerScript(FightUI);
registerScript(hpBehaviour);
registerScript(goldBehaviour);
registerScript(Shop);
registerScript(enterShop);
registerScript(hphupBehaviour);
registerScript(EFbear);
registerScript(Fight);
registerScript(TP);
registerScript(StartUIBehaviour);
registerScript(FightBOSS);
registerScript(Fights);
registerScript(Fightm);
registerScript(Fightr);
registerScript(Fightw);
registerScript(Fightb);
registerScript(attBehaviour);
registerScript(defBehaviour);
registerScript(EFsnake);
registerScript(EFrabbit);
registerScript(EFmouse);
registerScript(EFwildpig);
registerScript(EFwildpig2);
registerScript(Fightw2);
registerScript(Fightb2);
registerScript(Fightb3);
registerScript(EFbear2);
registerScript(EFbear3);
registerScript(EFBOSS);
registerScript(bananaBehaviour);
registerScript(appleBehaviour);
registerScript(peachBehaviour);
registerScript(Applemeet);
registerScript(Bananameet);
registerScript(Peachmeet);
registerScript(Attmeet);
registerScript(Capmeet);
registerScript(Milkmeet);
registerScript(Lock0);
registerScript(Lock1);
registerScript(Lock2);
registerScript(StartUIshuomingBehaviour);
registerScript(ShuomingUIBehaviour);
registerScript(UIdisappear);
registerScript(daocaoren1);
registerScript(cao);
registerScript(shengchengUI);
registerScript(daocaorenkaidemen);
registerScript(yuxieshitou);
registerScript(yuxiexiaoshi)
registerScript(nainiu)


core.loadImage("assets/ui.jpg")
core.loadImage("assets/coin.png")
core.loadImage("assets/0.png")
core.loadImage("assets/1.png")
core.loadImage("assets/2.png")
core.loadImage("assets/3.png")
core.loadImage("assets/4.png")
core.loadImage("assets/5.png")
core.loadImage("assets/6.png")
core.loadImage("assets/7.png")
core.loadImage("assets/8.png")
core.loadImage("assets/a.png")
core.loadImage("assets/s.png")

core.loadImage("assets/shop.png")
core.loadImage("assets/ability.png")



core.loadImage("assets/Fight.png")
core.loadImage("assets/VICTORY.png")
core.loadImage("assets/defeated.png")


// core.loadImage("assets/前/前.png")
// core.loadImage("assets/后/后.png")
// core.loadImage("assets/左/左.png")
// core.loadImage("assets/右/右.png")


// core.loadImage("assets/农夫/前.png")
core.loadImage("assets/前/1.png")
core.loadImage("assets/前/2.png")
core.loadImage("assets/后/1.png")
core.loadImage("assets/后/2.png")

core.loadImage("assets/左/1.png")
core.loadImage("assets/左/2.png")
core.loadImage("assets/右/1.png")
core.loadImage("assets/右/2.png")




core.loadImage("assets/mapbackground/1.png")
core.loadImage("assets/mapbackground/2.png")
core.loadImage("assets/mapbackground/3.png")
core.loadImage("assets/mapbackground/4.png")
core.loadImage("assets/mapbackground/5.png")

//core.loadImage("assets/daoju/di野兔.png")


core.loadImage("assets/tools/0.png")
core.loadImage("assets/tools/1.png")
core.loadImage("assets/tools/2.png")
core.loadImage("assets/tools/3.png")
core.loadImage("assets/tools/4.png")
core.loadImage("assets/tools/5.png")
core.loadImage("assets/tools/6.png")
core.loadImage("assets/tools/7.png")
core.loadImage("assets/tools/8.png")
core.loadImage("assets/tools/9.png")

core.loadImage("assets/animals/0.png")
core.loadImage("assets/animals/1.png")
core.loadImage("assets/animals/2.png")
core.loadImage("assets/animals/3.png")
core.loadImage("assets/animals/4.png")
core.loadImage("assets/animals/5.png")
core.loadImage("assets/animals/6.png")
core.loadImage("assets/animals/7.png")
core.loadImage("assets/animals/8.png")
core.loadImage("assets/animals/9.png")

core.loadImage("assets/door/1.png")
core.loadImage("assets/door/2.png")
core.loadImage("assets/door/3.png")
core.loadImage("assets/door/4.png")
core.loadImage("assets/door/5.png")

core.loadImage("assets/yuxie.png")

core.loadImage("assets/shop/shop.png")

core.loadImage("assets/attribute/1.png")
core.loadImage("assets/attribute/2.png")
core.loadImage("assets/attribute/3.png")
core.loadImage("assets/attribute/4.png")
core.loadImage("assets/attribute/5.png")
core.loadImage("assets/attribute/6.png")
core.loadImage("assets/attribute/7.png")

core.loadImage("assets/battle/battle.png")
core.loadImage("assets/battle/victoryUI.png")
core.loadImage("assets/battle/loseUI.png")

core.loadImage("assets/head/mouse.png")
core.loadImage("assets/head/rabbit.png")
core.loadImage("assets/head/snake.png")
core.loadImage("assets/head/wildpig.png")
core.loadImage("assets/head/bear.png")
core.loadImage("assets/head/champazee.png")

core.loadImage("assets/门/menshang.png")
core.loadImage("assets/门/menxia.png")
core.loadImage("assets/门/menzuo.png")
core.loadImage("assets/门/menyou.png")

core.loadImage("assets/startjson/button1.png")
core.loadImage("assets/startjson/button2.png")
core.loadImage("assets/startjson/fengmian.png")
core.loadImage("assets/startjson/shengying.png")
core.loadImage("assets/startjson/shuoming.png")
core.loadImage("assets/startjson/shuomingjson.png")

core.loadImage("assets/communicateUI/1.png")
core.loadImage("assets/communicateUI/2.png")
core.loadImage("assets/communicateUI/3.png")
core.loadImage("assets/communicateUI/4.png")
core.loadImage("assets/communicateUI/5.png")
core.loadImage("assets/communicateUI/6.png")
core.loadImage("assets/communicateUI/7.png")
core.loadImage("assets/communicateUI/8.png")
core.loadImage("assets/communicateUI/9.png")
core.loadImage("assets/communicateUI/10.png")


core.loadImage("assets/finishi.png")



core.start();
// marshal.changeState(new MarshalLandingState())
// core.loadScene('assets/tilemap.prefab.scene.json')

//marshal.changeState(new MarshalTestState());
marshal.changeState(new MarshalStartState());


//marshal.changeState(new MarshalOpeningState());
// marshal.changeState(new MarshalSixthState());

//marshal.changeState(new MarshalOpeningState());
//marshal.changeState(new MarshalStartState());
// marshal.changeState(new MarshalFinishState());



 //marshal.changeState(new MarshalFirstState());
 //marshal.changeState(new MarshalSecondState());
// marshal.changeState(new MarshalThirdState());
// marshal.changeState(new MarshalFourthState());
// marshal.changeState(new MarshalFifthState());
 //marshal.changeState(new MarshalSixthState());
//marshal.changeState(new MarshalSeventhState());



